//
//  XQPromptTableViewCell.m
//  XQClock
//
//  Created by 孙强 on 2024/8/10.
//

#import "XQPromptTableViewCell.h"

@implementation XQPromptTableViewCell



//background: #6525FF;



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createCell];
    }
    return self;
    
}

- (void)createCell{
    
    self.backgroundColor = UIColor.clearColor;
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    WEAKSELF;
    
    UIView *backView = [[UIView alloc] init];
    [self.contentView addSubview:backView];
    ViewBorderRadius(backView, 20, 0, UIColor.whiteColor);
    backView.backgroundColor = [UIColor whiteColor];
    
    [backView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(-20*GJWidth);
        make.left.equalTo(20*GJWidth);
        make.top.equalTo(0);
        make.bottom.equalTo(-20*GJHeight);
    }];
    
    
    
    
    
    _nameLabel = [[UILabel alloc] init];
    _nameLabel.font = [UIFont boldSystemFontOfSize:16*GJWidth];
    _nameLabel.textColor = UIColor.whiteColor;
    _nameLabel.text =@"STEP 01";
    _nameLabel.textAlignment = 1;
    _nameLabel.backgroundColor = colorFromHexString(@"6525FF");
    [backView addSubview:_nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.equalTo(100*GJWidth);
        make.left.equalTo(20*GJWidth);
        make.top.equalTo(20*GJHeight);
        make.height.equalTo(32*GJHeight);
    }];
    ViewBorderRadius(_nameLabel, 16*GJHeight, 0, UIColor.whiteColor);
    
    
    _contentLabel = [[UILabel alloc] init];
    _contentLabel.font = [UIFont systemFontOfSize:16*GJWidth];
    _contentLabel.textColor = UIColor.blackColor;
    _contentLabel.text =@"Completed | EP.20";
    _contentLabel.numberOfLines = 0;
    [backView addSubview:_contentLabel];
    [_contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(-20*GJWidth);
        make.left.equalTo(20*GJWidth);
        make.top.equalTo(_nameLabel.bottom).offset(10*GJHeight);
        make.bottom.equalTo(-20*GJHeight);
    }];
    
    
    
    
    
}




- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
